<script type="text/javascript" src="include/js/number.js"></script>
<script type="text/javascript" src="include/js/uploader/progressbar.js"></script>
<script type="text/javascript" src="include/js/uploader/upload.js"></script>

<script type="text/javascript">


	var options = {
			
			limit: numeroDeFotos,
			
			//id of the upload container
			container: 'upload',
			
			//where to send the upload request
			base: 'include/php/upload.php',
			
			//filter file types
			filetype: 'jpg,gif,png',
			
			//form field name
			name: 'names[]',
			
			multiple: multiple,
			
			progressbar: {

				width: 140, //fix the progressbar width, optional
				color: '#000', 
				fillColor: '#fff',
				text: 'Subindo...',
				onChange: function (value, progressbar) {
				
					//console.log(arguments)
					progressbar.setText('completed: ' + (100 * value).format() + '%')
				}
			},
			
			
			onAbort: function () {
			    alert('Somente são permitidas imagens. Utilize arquivos jpg, gif ou png');
			},
			
			onSuccess: function () { 
			    alert('Transferência completa!');
			}
		};
	
		//enable file drag drop on $('upload')
		// uploadManager.attachDragEvents('upload', options);

		//click to add a new file upload

		
		document.getElementById('linkU').addEvent('click', function(e) {
		
			e.stop();
			
			uploadManager.upload(options);
		});
	
	

</script>
